<script setup lang="ts">
// 导入
import { useCounterStore } from './store/count'

// 获取仓库
const store = useCounterStore()

// 后续所有操作的逻辑  通过 store 点出来即可
</script>

<template>
  <div id="app">
    <h2>count:{{ store.count }}</h2>
    <button @click="store.updateCount()">修改</button>
    <button @click="store.updateCountPlus(66)">传递参数修改</button>
    <h2>doubleCount 计算属性:{{ store.doubleCount }}</h2>
    <button @click="store.asyncUpdateCount()">异步修改</button>
  </div>
</template>

<style scoped></style>
